package com.google.code.p.restrpc.client.loadbalance;

import java.util.List;

import com.google.code.p.restrpc.RpcRequest;

/**
 * Must be implemented safely
 * 
 * @author dz
 */
public interface LoadBalanceStrategy {
    
    /**
     * @param serviceName
     * @param methodName
     * @param requests
     * @return
     */
    public int select(String serviceName,
                      String methodName,
                      RpcRequest[] requests);
    
    /**
     * @param serviceName
     * @param methodName
     * @param requests
     * @return
     */
    public int select(String serviceName,
                      String methodName,
                      List<RpcRequest> requests);
    
}
